﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace MentalAlchemy.Molecules.NevaAlgorithm.compounds
{
	public partial class NeuralProblemSelectorControl : UserControl
	{
		#region - Public properties. -
		/// <summary>
		/// Name of the problem selected in the problem combo-box.
		/// </summary>
		public string SelectedProblemName
		{
			get { return (string)ProblemCombo.SelectedItem; }
		}

		/// <summary>
		/// Returns selected neural objective function.
		/// </summary>
		public NeuralObjectiveFunction SelectedProblem
		{
			get { return NeuralObjectiveFunctions.GetFunction(SelectedProblemName); }
		}
		#endregion

		#region - Construction. -
		public NeuralProblemSelectorControl()
		{
			InitializeComponent();

			var names = NeuralObjectiveFunctions.Functions();
			foreach (var name in names)
			{
				ProblemCombo.Items.Add(name);
			}
			ProblemCombo.SelectedIndex = 0;
		} 
		#endregion
	}
}
